package cn.wawi.entity.sys;

import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @description 系统日志记录实体类
 * @author 龚亮
 * @date 2015-05-26 09:43:45
 */
public class Log implements java.io.Serializable{

	private static final long serialVersionUID = 1L;

	private Long id;
	private String optUser;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date inputTime;
	private String operationCode;
	private String browser;
	private String os;
	private String requestParam;
	private String description;
	private Integer isSuccess=1;
	private String realname;
	private String ip;
	public Log(){
		this.inputTime=new Date();
	}
	/**
	 * @param optUser  操作用户
	 * @param realname 用户真实姓名
	 * @param methodName 方法
	 * @param actionName 类名
	 * @param isSuccess 是否成功 1成功 0失败
	 * @param description 描述
	 */
	public Log(String optUser,String realname,String operationCode,Integer isSuccess,String description){
		this.inputTime=new Date();
		this.optUser=optUser;
		this.realname=realname;
		this.operationCode=operationCode;
		this.isSuccess=isSuccess;
		this.description=description;
	}
	public Log(String description,String ip){
		this.inputTime=new Date();
		this.description=description;
		this.ip=ip;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getOptUser() {
		return optUser;
	}
	public void setOptUser(String optUser) {
		this.optUser = optUser;
	}
	public Date getInputTime() {
		return inputTime;
	}
	public void setInputTime(Date inputTime) {
		this.inputTime = inputTime;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Integer getIsSuccess() {
		return isSuccess;
	}
	public void setIsSuccess(Integer isSuccess) {
		this.isSuccess = isSuccess;
	}
	public String getRealname() {
		return realname;
	}
	public void setRealname(String realname) {
		this.realname = realname;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public String getOperationCode() {
		return operationCode;
	}
	public void setOperationCode(String operationCode) {
		this.operationCode = operationCode;
	}
	public String getBrowser() {
		return browser;
	}
	public void setBrowser(String browser) {
		this.browser = browser;
	}
	public String getOs() {
		return os;
	}
	public void setOs(String os) {
		this.os = os;
	}
	public String getRequestParam() {
		return requestParam;
	}
	public void setRequestParam(String requestParam) {
		this.requestParam = requestParam;
	}
}
